package com.ktjy.t382.ch01.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

//@Controller
//@ResponseBody

@RestController
@RequestMapping("/hello")
public class HelloController {

    @RequestMapping("/say")
    public String say(@RequestParam String name) {
        return "Hello " + name;
    }

    @RequestMapping("/error")
    public String error() {
        return "error";
    }
}
